package com.sanbi.erp.db.util;

import java.util.ArrayList;
import java.util.List;

public class CommentUtil {

    public static final Integer GOODS_ZERO_COMMENT_STATUS = 0;
    public static final Integer GOODS_ONE_COMMENT_STATUS = 1;
    public static final Integer GOODS_TWO_COMMENT_STATUS = 2;

    public static List<Integer> CommentStarList(String star) {
       List<Integer> list = new ArrayList<>();
        if (star.equals("差评")) {
            list.add(1);
            list.add(2);
            return list;
        }

        if (star.equals("较好")) {
            list.add(3);
            return list;
        }

        if (star.equals("好评")) {
            list.add(4);
            list.add(5);
            return list;
        }
        return null;
    }

    public static boolean CommentStarIF(String star) {
        if (star.equals("1") || star.equals("2") || star.equals("3") || star.equals("4") || star.equals("5")){
            return true;
        }
        return false;
    }
}
